<?php
namespace app\we\controller;
use think\Controller;
use app\we\sdk\Thinkwechat;


class Desk extends Controller{

    public function index($shopId='',$tableNum='',$scan='',$openid=''){
      
        if ($scan+600>time()){
           $url="http://m.dianping.com/hobbit/order/scanredirect?shopid=".$shopId."&label=3&tablenum=".$tableNum."&fromthird=1";
           header("Location:".$url);
           die; 
         }else{
           $this->error('页面已经过期，请重新扫码',url('we/feed/index',array('openid'=>$openid)));
         }
      
    }

    public function desks($openid=''){
        $members=model('we/WeSceneScan')->where('openid',$openid)->select();

        $desks=[];
        // $this->assgin('desks',$desks);
        return $this->fetch();
      
    }

}